Vercel

External APIs

Build full-stack applications by calling external APIs with environment variables.

You can call external services in your v0 prototypes by storing access keys as environment variables. This works for both third-party and your own APIs.

Adding API keys

Follow Project Menu ...Environment Variables to add your necessary keys or modify existing environment variables. Note that the v0 preview will only be able to access environment variables that are available to the Development environment.

Environments

When adding a variable, you can choose which environments it applies to. This lets you use different API keys for testing vs production, or enable features only in certain environments.

EnvironmentDescription
ProductionApplied to your live, published app
PreviewApplied to preview deployments (non-production branches)
DevelopmentApplied to the v0 preview panel or when running locally

Environment variables are encrypted and stored securely on Vercel. Once added, you can instruct v0 to use them in your API calls.

Learn more about environment variables

On this page